﻿using System;
using System.Collections.Generic;
using System.Data;

using System.Text;
using KPIS.GERP.ESS.DAL;
using KPIS.GERP.ESS.MODEL;

namespace KPIS.GERP.ESS.BLL
{
    public class B_HrmChangeData
    {
        private static readonly D_HrmChangeData dal = new D_HrmChangeData();

        public DataSet GetChangeData(Nullable<int> Sequence, Nullable<int> EmpSequence, Nullable<int> ChangeSequence, string SearchText)
        { 
            return dal.GetChangeData(Sequence, EmpSequence, ChangeSequence, SearchText);
        }
        public void Insert(int ChangeSequence, Nullable<int> NamePrefix, string FirstName, string LastName
            , string FirstNameEng, string LastNameEng, string NickName, string Citizen, string TaxPayer
            , string Social, string Official, Nullable<int> Gender, string Religion, string RaceNationalities
            , string Nationalities, string BloodGroup, Nullable<DateTime> BirthDate, string Remarks, int CreatedBy)
        {
            try
            {
                dal.Insert(ChangeSequence, NamePrefix, FirstName, LastName, FirstNameEng, LastNameEng, NickName
                    , Citizen, TaxPayer, Social, Official, Gender, Religion, RaceNationalities, Nationalities
                    , BloodGroup, BirthDate, Remarks, CreatedBy);
            }
            catch
            {
                throw;
            }
        }
        public void Update(int Sequence, Nullable<int> NamePrefix, string FirstName, string LastName
            , string FirstNameEng, string LastNameEng, string NickName, string Citizen, string TaxPayer
            , string Social, string Official, Nullable<int> Gender, string Religion, string RaceNationalities
            , string Nationalities, string BloodGroup, Nullable<DateTime> BirthDate, string Remarks, int UpdatedBy)
        {
            try
            {
                dal.Update(Sequence, NamePrefix, FirstName, LastName, FirstNameEng, LastNameEng, NickName
                    , Citizen, TaxPayer, Social, Official, Gender, Religion, RaceNationalities, Nationalities
                    , BloodGroup, BirthDate, Remarks, UpdatedBy);
            }
            catch
            {
                throw;
            }
        }
        public void Delete(int Sequence, int UpdatedBy)
        {
            try
            {
                dal.Delete(Sequence, UpdatedBy);
            }
            catch
            {
                throw;
            }
        }
    }
}
